home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / info / lispref.info-30 < prev    next >
Encoding:
GNU Info File  |  1995-09-01  |  49.8 KB  |  1,123 lines

  1. This is Info file ../../info/lispref.info, produced by Makeinfo-1.63
  2. from the input file lispref.texi.
  3.  
  4.    Edition History:
  5.  
  6.    GNU Emacs Lisp Reference Manual Second Edition (v2.01), May 1993 GNU
  7. Emacs Lisp Reference Manual Further Revised (v2.02), August 1993 Lucid
  8. Emacs Lisp Reference Manual (for 19.10) First Edition, March 1994
  9. XEmacs Lisp Programmer's Manual (for 19.12) Second Edition, April 1995
  10. GNU Emacs Lisp Reference Manual v2.4, June 1995 XEmacs Lisp
  11. Programmer's Manual (for 19.13) Third Edition, July 1995
  12.  
  13.    Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995 Free Software
  14. Foundation, Inc.  Copyright (C) 1994, 1995 Sun Microsystems, Inc.
  15. Copyright (C) 1995 Amdahl Corporation.  Copyright (C) 1995 Ben Wing.
  16.  
  17.    Permission is granted to make and distribute verbatim copies of this
  18. manual provided the copyright notice and this permission notice are
  19. preserved on all copies.
  20.  
  21.    Permission is granted to copy and distribute modified versions of
  22. this manual under the conditions for verbatim copying, provided that the
  23. entire resulting derived work is distributed under the terms of a
  24. permission notice identical to this one.
  25.  
  26.    Permission is granted to copy and distribute translations of this
  27. manual into another language, under the above conditions for modified
  28. versions, except that this permission notice may be stated in a
  29. translation approved by the Foundation.
  30.  
  31.    Permission is granted to copy and distribute modified versions of
  32. this manual under the conditions for verbatim copying, provided also
  33. that the section entitled "GNU General Public License" is included
  34. exactly as in the original, and provided that the entire resulting
  35. derived work is distributed under the terms of a permission notice
  36. identical to this one.
  37.  
  38.    Permission is granted to copy and distribute translations of this
  39. manual into another language, under the above conditions for modified
  40. versions, except that the section entitled "GNU General Public License"
  41. may be included in a translation approved by the Free Software
  42. Foundation instead of in the original English.
  43.  
  44. 
  45. File: lispref.info,  Node: Finding Extents,  Next: Extent Properties,  Prev: Extent Endpoints,  Up: Extents
  46.  
  47. Finding Extents
  48. ===============
  49.  
  50.    The following functions allow for scanning over the extents in a
  51. buffer or searching for extents in a particular range of a buffer.
  52. Keep in mind the way that extents are ordered in a buffer (*note Extent
  53. Endpoints::.).
  54.  
  55.  - Function: next-extent EXTENT
  56.      Given an extent EXTENT, this function returns the next extent in
  57.      the buffer's display order.  If EXTENT is a buffer, this returns
  58.      the first extent in the buffer.
  59.  
  60.  - Function: previous-extent EXTENT
  61.      Given an extent EXTENT, this function returns the previous extent
  62.      in the buffer's display order.  If EXTENT is a buffer, this
  63.      returns the last extent in the buffer.
  64.  
  65.    If you want to map over all extents that meet a certain criterion,
  66. use `map-extents' - it is much faster than a loop involving
  67. `next-extent'.
  68.  
  69.  - Function: extent-at POS &optional BUFFER PROPERTY BEFORE
  70.      This function finds the "smallest" extent (i.e., the last one in
  71.      the display order) at (i.e., overlapping) POS in BUFFER having
  72.      PROPERTY set.  BUFFER defaults to the current buffer.  PROPERTY
  73.      defaults to `nil', meaning that any extent will do.  Returns `nil'
  74.      if there is no matching extent at POS.  If the fourth argument
  75.      BEFORE is not `nil', it must be an extent; any returned extent
  76.      will precede that extent.  This feature allows `extent-at' to be
  77.      used by a loop over extents.
  78.  
  79.  - Function: map-extents FUNCTION &optional BUFFER FROM TO MAPARG
  80.           CLOSED-END
  81.      This function maps FUNCTION over the extents which overlap the
  82.      region `[FROM, TO)' (or `[FROM, TO]' if CLOSED-END is non-`nil')
  83.      in BUFFER.  FUNCTION is called with the arguments `(extent,
  84.      MAPARG)'.  The arguments FROM, TO, MAPARG, and BUFFER default to
  85.      the beginning of BUFFER, the end of BUFFER, `nil', and
  86.      `(current-buffer)', respectively.  `map-extents' returns the first
  87.      non-`nil' result produced by FUNCTION, and no more calls to
  88.      FUNCTION are made after that.  If BUFFER is an extent, FROM and TO
  89.      default to the extent's endpoints, and the mapping omits that
  90.      extent and its predecessors.  This feature supports restarting a
  91.      loop based on `map-extents'.
  92.  
  93.      The effect of CLOSED-END is that, if an extent and the map region
  94.      overlap only at a start and end position, the extent is visited by
  95.      `map-extents' only if both positions are closed.
  96.  
  97.  - Function: map-extent-children FUNCTION &optional BUFFER FROM TO
  98.           MAPARG CLOSED-END
  99.      This function is similar to `map-extents', but differs in that:
  100.  
  101.         * It only visits extents which start in the given region.
  102.  
  103.         * After visiting an extent E, it skips all other extents which
  104.           start inside E but end before E's end.
  105.  
  106.      Thus, this function may be used to walk a tree of extents in a
  107.      buffer:
  108.           (defun walk-extents (buffer &optional ignore)
  109.             (map-extent-children 'walk-extents buffer))
  110.  
  111.  - Function: extent-in-region-p EXTENT &optional FROM TO CLOSED-END
  112.      This function returns T if `map-extents' would visit EXTENT if
  113.      called with the given arguments.
  114.  
  115. 
  116. File: lispref.info,  Node: Extent Properties,  Next: Detached Extents,  Prev: Finding Extents,  Up: Extents
  117.  
  118. Properties of Extents
  119. =====================
  120.  
  121.    Each extent has a property list associating property names with
  122. values.  Some property names have predefined meanings, and can usually
  123. only assume particular values.  Assigning other values to such a
  124. property either cause the value to be converted into a legal value
  125. (e.g., assigning anything but `nil' to a Boolean property will cause
  126. the value of `t' to be assigned to the property) or will cause an
  127. error.  Property names without predefined meanings can be assigned any
  128. value.  An undefined property is equivalent to a property with a value
  129. of `nil', or with a particular default value in the case of properties
  130. with predefined meanings.  Note that, when an extent is created, the
  131. `end-open' and `detachable' properties are set on it.
  132.  
  133.  - Function: extent-property EXTENT PROPERTY
  134.      This function returns the value of PROPERTY in EXTENT.  If
  135.      PROPERTY is undefined, `nil' is returned.
  136.  
  137.  - Function: extent-properties EXTENT
  138.      This function returns a list of all of EXTENT's properties that do
  139.      not have the value of `nil' (or the default value, for properties
  140.      with predefined meanings).
  141.  
  142.  - Function: set-extent-property EXTENT PROPERTY VALUE
  143.      This function sets PROPERTY to VALUE in EXTENT. (If PROPERTY has a
  144.      predefined meaning, only certain values are allowed, and some
  145.      values may be converted to others before being stored.)
  146.  
  147.    The following table lists the properties with predefined meanings,
  148. along with their allowable values.
  149.  
  150. `detached'
  151.      (Boolean) Whether the extent is detached.   Setting this is the
  152.      same as calling `detach-extent'.  *Note Detached Extents::.
  153.  
  154. `destroyed'
  155.      (Boolean) Whether the extent has been deleted.  Setting this is
  156.      the same as calling `delete-extent'.
  157.  
  158. `priority'
  159.      (integer) The extent's redisplay priority.  Defaults to 0.  *Note
  160.      priority: Intro to Extents.  This property can also be set with
  161.      `set-extent-priority' and accessed with `extent-priority'.
  162.  
  163. `start-open'
  164.      (Boolean) Whether the start position of the extent is open,
  165.      meaning that characters inserted at that position go outside of
  166.      the extent.  *Note Extent Endpoints::.
  167.  
  168. `start-closed'
  169.      (Boolean) Same as `start-open' but with the opposite sense.
  170.      Setting this property clears `start-open' and vice-versa.
  171.  
  172. `end-open'
  173.      (Boolean) Whether the end position of the extent is open, meaning
  174.      that characters inserted at that position go outside of the
  175.      extent.  This is `t' by default.  *Note Extent Endpoints::.
  176.  
  177. `end-closed'
  178.      (Boolean) Same as `end-open' but with the opposite sense.  Setting
  179.      this property clears `end-open' and vice-versa.
  180.  
  181. `read-only'
  182.      (Boolean) Whether text within this extent will be unmodifiable.
  183.  
  184. `face'
  185.      (face, face name, or `nil') The face in which to display the
  186.      extent's text.  This property can also be set with
  187.      `set-extent-face' and accessed with `extent-face'.
  188.  
  189. `highlight'
  190.      (Boolean) Whether to highlight the extent when the mouse moves
  191.      over it.  *Note Extents and Events::.
  192.  
  193. `detachable'
  194.      (Boolean) Whether this extent becomes detached when all of the
  195.      text it covers is deleted.  This is `t' by default.  *Note
  196.      Detached Extents::.
  197.  
  198. `duplicable'
  199.      (Boolean) Whether this extent should be copied into strings, so
  200.      that kill, yank, and undo commands will restore or copy it.  *Note
  201.      Duplicable Extents::.
  202.  
  203. `unique'
  204.      (Boolean) Meaningful only in conjunction with `duplicable'.  When
  205.      this is set, there may be only one instance of this extent
  206.      attached at a time.  *Note Duplicable Extents::.
  207.  
  208. `invisible'
  209.      (Boolean) If `t', text under this extent will not be displayed -
  210.      it will look as if the text is not there at all.
  211.  
  212. `keymap'
  213.      (keymap or `nil') This keymap is consulted for mouse clicks on this
  214.      extent or keypresses made while `point' is within the extent.
  215.      *Note Extents and Events::.
  216.  
  217. `copy-function'
  218.      This is a hook that is run when a duplicable extent is about to be
  219.      copied from a buffer to a string (or the kill ring).  *Note
  220.      Duplicable Extents::.
  221.  
  222. `paste-function'
  223.      This is a hook that is run when a duplicable extent is about to be
  224.      copied from a string (or the kill ring) into a buffer.  *Note
  225.      Duplicable Extents::.
  226.  
  227. `glyph-layout'
  228.      ('text, 'whitespace, 'inside-margin, or 'outside-margin) The layout
  229.      policy for this extent's glyph.  Defaults to `text'.  *Note
  230.      Annotations::.
  231.  
  232. `begin-glyph'
  233.      (pixmap, string, or `nil') This extent's begin-glyph.  Cannot be
  234.      non-`nil' at the same time as `end-glyph'.  *Note Annotations::.
  235.  
  236. `end-glyph'
  237.      (pixmap, string, or `nil') This extent's end-glyph.  Cannot be
  238.      non-`nil' at the same time as `begin-glyph'.  *Note Annotations::.
  239.  
  240.    The following convenience functions are provided for accessing
  241. particular properties of an extent.
  242.  
  243.  - Function: extent-priority EXTENT
  244.      This function returns the `priority' property of EXTENT.
  245.  
  246.  - Function: extent-face EXTENT
  247.      This function returns the `face' property of EXTENT.
  248.  
  249.  - Function: extent-layout EXTENT
  250.      This function returns the `glyph-layout' property of EXTENT.
  251.  
  252.  - Function: extent-glyph EXTENT
  253.      This function returns the glyph associated with EXTENT.  This is
  254.      the value of the `begin-glyph' or `end-glyph' property, if either
  255.      one is non-`nil'. (It is not possible for both to be non-`nil' at
  256.      the same time.)
  257.  
  258.    The following convenience functions are provided for setting
  259. particular properties of an extent.
  260.  
  261.  - Function: set-extent-priority EXTENT PRI
  262.      This function sets the `priority' property of EXTENT to PRI.
  263.  
  264.  - Function: set-extent-face EXTENT FACE
  265.      This function sets the `face' property of EXTENT to FACE.
  266.  
  267.  - Function: set-extent-layout EXTENT LAYOUT
  268.      This function sets the `glyph-layout' property of EXTENT to LAYOUT.
  269.  
  270.  - Function: set-extent-begin-glyph EXTENT BEGIN-GLYPH &optional LAYOUT
  271.      This function sets the `begin-glyph' and `glyph-layout' properties
  272.      of EXTENT to BEGIN-GLYPH and LAYOUT, respectively. (LAYOUT
  273.      defaults to `text' if not specified.) This function will fail if
  274.      EXTENT already has an END-GLYPH property.
  275.  
  276.  - Function: set-extent-end-glyph EXTENT END-GLYPH &optional LAYOUT
  277.      This function sets the `end-glyph' and `glyph-layout' properties
  278.      of EXTENT to END-GLYPH and LAYOUT, respectively. (LAYOUT defaults
  279.      to `text' if not specified.) This function will fail if EXTENT
  280.      already has a BEGIN-GLYPH property.
  281.  
  282. 
  283. File: lispref.info,  Node: Detached Extents,  Next: Duplicable Extents,  Prev: Extent Properties,  Up: Extents
  284.  
  285. Detached Extents
  286. ================
  287.  
  288.    A detached extent is an extent that is not attached to a buffer but
  289. can be re-inserted.  Detached extents have a start position and end
  290. position of `nil'.  Extents can be explicitly detached using
  291. `detach-extent'.  An extent is also detached when all of its characters
  292. are all killed by a deletion, if its `detachable' property is set; if
  293. this property is not set, the extent becomes a zero-length extent.
  294. (Zero-length extents with the `detachable' property set behave
  295. specially.  *Note zero-length extents: Extent Endpoints.)
  296.  
  297.  - Function: detach-extent EXTENT
  298.      This function detaches EXTENT from its buffer.  If EXTENT has the
  299.      `duplicable' property, its detachment is tracked by the undo
  300.      mechanism.  *Note Duplicable Extents::.
  301.  
  302.  - Function: extent-detached-p EXTENT
  303.      This function returns `nil' if EXTENT is detached, and `t'
  304.      otherwise.
  305.  
  306.  - Function: copy-extent EXTENT &optional BUFFER
  307.      This function makes a copy of EXTENT.  It is initially detached.
  308.      Optional argument BUFFER defaults to EXTENT's buffer.
  309.  
  310.  - Function: insert-extent EXTENT &optional START END NO-HOOKS
  311.      This function inserts EXTENT from START to END in the current
  312.      buffer.  If EXTENT is detached from a different buffer, or in most
  313.      cases when EXTENT is already attached, the extent will first be
  314.      copied as if with `copy-extent'.  This function operates the same
  315.      as if `insert' were called on a string whose extent data calls for
  316.      EXTENT to be inserted, except that if NO-HOOKS is non-`nil',
  317.      EXTENT's `paste-function' will not be invoked.  *Note Duplicable
  318.      Extents::.
  319.  
  320. 
  321. File: lispref.info,  Node: Duplicable Extents,  Next: Extent Replicas,  Prev: Detached Extents,  Up: Extents
  322.  
  323. Duplicable Extents
  324. ==================
  325.  
  326.    If an extent has the `duplicable' property, it will be copied into
  327. strings, so that kill, yank, and undo commands will restore or copy it.
  328. Note that the extent is not actually copied; rather, a pointer to it is
  329. stored, along with the start and end positions of the extent. (This
  330. combination is called an "extent replica".) This means that, e.g., if
  331. you copy a duplicable extent into the kill ring, then change the
  332. properties of the extent, then paste the kill-ring text back into the
  333. buffer, the newly-inserted extent will have the property changes you
  334. just made to the original extent, and not the property values at the
  335. time the text was copied into the kill ring.
  336.  
  337.    Specifically:
  338.  
  339.    * When a string is created using `buffer-substring' or
  340.      `buffer-string', any duplicable extents in the region corresponding
  341.      to the string will be remembered in the string (*note Buffer
  342.      Contents::.).  When the string in inserted into a buffer using
  343.      `insert', `insert-before-markers', `insert-buffer' or
  344.      `insert-buffer-substring', the remembered extents will be inserted
  345.      back into the buffer (*note Insertion::.).  The extents can also be
  346.      retrieved explicitly using `string-extent-data' (*note Extent
  347.      Replicas::.).
  348.  
  349.    * Similarly, when text is copied or cut into the kill ring, any
  350.      duplicable extents will be remembered and reinserted later when
  351.      the text is pasted back into a buffer.
  352.  
  353.    * An extent replica consists of a pointer to an extent and a range
  354.      within the string.  When an extent replica is inserted into a
  355.      buffer:
  356.  
  357.         - If the original extent was detached from this buffer, it is
  358.           reattached at the new range.
  359.  
  360.         - If the original extent is attached to this buffer and is
  361.           contiguous with or overlaps the new range, it is simply
  362.           extended to include that range.  Note that in this case the
  363.           extent's `paste-function' is not called (see below).
  364.  
  365.         - If the original extent was detached from another buffer, it
  366.           is copied as if by `copy-extent' and attached at the new
  367.           range.
  368.  
  369.         - If the original extent is attached to another buffer, or is
  370.           attached to this buffer and does not overlap the new range,
  371.           it is copied as if by `copy-extent' and attached at the new
  372.           range.  However, if the extent has the `unique' property,
  373.           this action is inhibited and nothing happens.
  374.  
  375.    * When `concat' is called on strings, the extent replicas remembered
  376.      in the strings are merged together and placed into the resulting
  377.      string.
  378.  
  379.    * When `substring' is called on a string, the relevant extent
  380.      replicas are placed into the resulting string.
  381.  
  382.    * When a duplicable extent is detached by `detach-extent' or string
  383.      deletion, or inserted by `insert-extent' or string insertion, the
  384.      action is recorded by the undo mechanism so that it can be undone
  385.      later.
  386.  
  387.    * Extent motion, face changes, and attachment via `make-extent' are
  388.      not recorded by the undo mechanism.  This means that extent changes
  389.      which are to be undo-able must be performed by character editing,
  390.      or by insertion and detachment of duplicable extents.
  391.  
  392.    * A duplicable extent's `copy-function' property, if non-`nil',
  393.      should be a function, and will be run when a duplicable extent is
  394.      about to be copied from a buffer to a string (or the kill ring).
  395.      It is called with three arguments: the extent and the buffer
  396.      positions within it which are being copied.  If this function
  397.      returns `nil', then the extent will not be copied; otherwise it
  398.      will.
  399.  
  400.    * A duplicable extent's `paste-function' property, if non-`nil',
  401.      should be a function, and will be run when a duplicable extent is
  402.      about to be copied from a string (or the kill ring) into a buffer.
  403.      It is called with three arguments: the original extent and the
  404.      buffer positions which the copied extent will occupy. (This hook
  405.      is run after the corresponding text has already been inserted into
  406.      the buffer.) Note that the extent argument may be detached when
  407.      this function is run.  If this function returns `nil', no extent
  408.      will be inserted.  Otherwise, there will be an extent covering the
  409.      range in question.
  410.  
  411.      Note: if the extent to be copied is already attached to the buffer
  412.      and overlaps the new range, the extent will simply be extended and
  413.      the `paste-function' will not be called.
  414.  
  415. 
  416. File: lispref.info,  Node: Extent Replicas,  Next: Extents and Events,  Prev: Duplicable Extents,  Up: Extents
  417.  
  418. Extent Replicas
  419. ===============
  420.  
  421.    The following primitives for manipulating extent replicas are
  422. available.  An extent replica is used to store extent data in a string
  423. and is a primitive data type encapsulating an extent and start and end
  424. positions within the string.  New extent replicas can be created but
  425. there are no mutator functions for modifying existing extent replicas.
  426. *Note Duplicable Extents::.
  427.  
  428.    Note: Lisp-visible extent replicas may disappear in the future
  429. (replaced by allowing `map-extents' to take a string argument).  Avoid
  430. using the following functions if at all possible.
  431.  
  432.  - Function: extent-replica-p OBJECT
  433.      This function returns non-`nil' if OBJECT is an extent replica.
  434.  
  435.  - Function: extent-replica-live-p OBJECT
  436.      This function returns non-`nil' if OBJECT is an extent replica
  437.      that has not been deleted.
  438.  
  439.  - Function: string-extent-data STRING
  440.      This function returns the extent data stored along with STRING.
  441.      The value returned is a list of extent replica objects.
  442.  
  443.  - Function: set-string-extent-data STRING DATA
  444.      This function sets the extent data stored along with a string.
  445.      `data' should be `nil' or a list of extent replicas.
  446.  
  447.  - Function: make-extent-replica EXTENT START END
  448.      This function makes an extent replica for EXTENT in the range from
  449.      `start' to `end'.
  450.  
  451.  - Function: extent-replica-extent DUP
  452.      This function returns the extent to which extent replica DUP
  453.      refers.
  454.  
  455.  - Function: extent-replica-start DUP
  456.      This function returns the start position of extent replica DUP.
  457.  
  458.  - Function: extent-replica-end DUP
  459.      This function returns the end position of extent replica DUP.
  460.  
  461. 
  462. File: lispref.info,  Node: Extents and Events,  Next: Atomic Extents,  Prev: Extent Replicas,  Up: Extents
  463.  
  464. Interaction of Extents with Keyboard and Mouse Events
  465. =====================================================
  466.  
  467.    If an extent has the `highlight' property set, it will be
  468. highlighted when the mouse passes over it.  Highlighting is accomplished
  469. by merging the extent's face with the `highlight' face.  The effect is
  470. as if a pseudo-extent with the `highlight' face were inserted after the
  471. extent in the display order (*note Extent Endpoints::., display order).
  472.  
  473.  - Variable: mouse-highlight-priority
  474.      This variable holds the priority to use when merging in the
  475.      highlighting pseudo-extent.  The default is 1000.  This is
  476.      purposely set very high so that the highlighting pseudo-extent
  477.      shows up even if there are other extents with various priorities
  478.      at the same location.
  479.  
  480.    You can also explicitly cause an extent to be highlighted.  Only one
  481. extent at a time can be highlighted in this fashion, and any other
  482. highlighted extent will be de-highlighted.
  483.  
  484.  - Function: highlight-extent EXTENT &optional HIGHLIGHT-P
  485.      This function highlights (if HIGHLIGHT-P is non-`nil') or
  486.      de-highlights (if HIGHLIGHT-P is `nil') EXTENT, if EXTENT has the
  487.      `highlight' property. (Nothing happens if EXTENT does not have the
  488.      `highlight' property.)
  489.  
  490.  - Function: force-highlight-extent EXTENT &optional HIGHLIGHT-P
  491.      This function is similar to `highlight-extent' but highlights or
  492.      de-highlights the extent regardless of whether it has the
  493.      `highlight' property.
  494.  
  495.    If an extent has a `keymap' property, this keymap will be consulted
  496. for mouse clicks on the extent and keypresses made while `point' is
  497. within the extent.  The behavior of mouse clicks and keystrokes not
  498. defined in the keymap is as normal for the buffer.
  499.  
  500. 
  501. File: lispref.info,  Node: Atomic Extents,  Prev: Extents and Events,  Up: Extents
  502.  
  503. Atomic Extents
  504. ==============
  505.  
  506.    If the Lisp file `atomic-extents' is loaded, then the atomic extent
  507. facility is available.  An "atomic extent" is an extent for which
  508. `point' cannot be positioned anywhere within it.  This ensures that
  509. when selecting text, either all or none of the extent is selected.
  510.  
  511.    To make an extent atomic, set its `atomic' property.
  512.  
  513. 
  514. File: lispref.info,  Node: Specifiers,  Next: Faces and Window-System Objects,  Prev: Extents,  Up: Top
  515.  
  516. Specifiers
  517. **********
  518.  
  519.    A specifier is an object used to keep track of a property whose value
  520. may vary depending on the particular situation (e.g. particular buffer
  521. displayed in a particular window) that it is used in.  The value of many
  522. built-in properties, such as the font, foreground, background, and such
  523. properties of a face and variables such as `modeline-shadow-thickness'
  524. and `top-toolbar-height', is actually a specifier object.  The
  525. specifier object, in turn, is "instanced" in a particular situation to
  526. yield the real value of the property in that situation.
  527.  
  528.  - Function: specifierp OBJECT
  529.      This function returns non-`nil' if OBJECT is a specifier.
  530.  
  531. * Menu:
  532.  
  533. * Introduction to Specifiers::    Specifiers provide a clean way for
  534.                 display and other properties to vary
  535.                 (under user control) in a wide variety
  536.                 of contexts.
  537. * Specifiers In-Depth::        Gory details about specifier innards.
  538. * Specifier Instancing::    Instancing means obtaining the "value" of
  539.                 a specifier in a particular context.
  540. * Specifier Types::        Specifiers come in different flavors.
  541. * Adding Specifications::    Specifications control a specifier's "value"
  542.                 by giving conditions under which a
  543.                 particular value is valid.
  544. * Retrieving Specifications::    Querying a specifier's specifications.
  545. * Specifier Tag Functions::    Working with specifier tags.
  546. * Specifier Instancing Functions::
  547.                 Functions to instance a specifier.
  548. * Specifier Example::        Making all this stuff clearer.
  549. * Creating Specifiers::        Creating specifiers for your own use.
  550. * Specifier Validation Functions::
  551.                 Validating the components of a specifier.
  552. * Other Specification Functions::
  553.                 Other ways of working with specifications.
  554.  
  555. 
  556. File: lispref.info,  Node: Introduction to Specifiers,  Next: Specifiers In-Depth,  Up: Specifiers
  557.  
  558. Introduction to Specifiers
  559. ==========================
  560.  
  561.    Sometimes you may want the value of a property to vary depending on
  562. the context the property is used in.  A simple example of this in XEmacs
  563. is buffer-local variables.  For example, the variable
  564. `modeline-format', which controls the format of the modeline, can have
  565. different values depending on the particular buffer being edited.  The
  566. variable has a default value which most modes will use, but a
  567. specialized package such as Calendar might change the variable so as to
  568. tailor the modeline to its own purposes.
  569.  
  570.    Other properties (such as those that can be changed by the
  571. `modify-frame-parameters' function, for example the color of the text
  572. cursor) can have frame-local values, although it might also make sense
  573. for them to have buffer-local values.  In other cases, you might want
  574. the property to vary depending on the particular window within the
  575. frame that applies (e.g. the top or bottom window in a split frame), the
  576. device type that that frame appears on (X or tty), etc.  Perhaps you can
  577. envision some more complicated scenario where you want a particular
  578. value in a specified buffer, another value in all other buffers
  579. displayed on a particular frame, another value in all other buffers
  580. displayed in all other frames on any mono (two-color, e.g. black and
  581. white only) displays, and a default value in all other circumstances.
  582.  
  583.    A "specifier" is a generalization of this, allowing a great deal of
  584. flexibility in controlling exactly what value a property has in which
  585. circumstances.  It is most commonly used for display properties, such as
  586. an image or the foreground color of a face.  As a simple example, you
  587. can specify that the foreground of the default face be
  588.  
  589.    * blue for a particular buffer
  590.  
  591.    * green for all other buffers
  592.  
  593.    As a more complicated example, you could specify that the foreground
  594. of the default face be
  595.  
  596.    * forest green for all buffers displayed in a particular Emacs
  597.      window, or green if the X server doesn't recognize the color
  598.      `forest green'
  599.  
  600.    * blue for all buffers displayed in a particular frame
  601.  
  602.    * red for all other buffers displayed on a color device
  603.  
  604.    * white for all other buffers
  605.  
  606. 
  607. File: lispref.info,  Node: Specifiers In-Depth,  Next: Specifier Instancing,  Prev: Introduction to Specifiers,  Up: Specifiers
  608.  
  609. In-Depth Overview of a Specifier
  610. ================================
  611.  
  612.    A specifier object encapsulates a set of "specifications", each of
  613. which says what its value should be if a particular condition applies.
  614. For example, one specification might be "The value should be
  615. darkseagreen2 on X devices" another might be "The value should be blue
  616. in the *Help* buffer".  In specifier terminology, these conditions are
  617. called "locales" and the values are called "instantiators".  Given a
  618. specifier, a logical question is "What is its value in a particular
  619. situation?" This involves looking through the specifications to see
  620. which ones apply to this particular situation, and perhaps preferring
  621. one over another if more than one applies.  In specifier terminology, a
  622. "particular situation" is called a "domain", and determining its value
  623. in a particular domain is called "instancing".  Most of the time, a
  624. domain is identified by a particular window.  For example, if the
  625. redisplay engine is drawing text in the default face in a particular
  626. window, it retrieves the specifier for the foreground color of the
  627. default face and "instances" it in the domain given by that window; in
  628. other words, it asks the specifier, "What is your value in this
  629. window?".
  630.  
  631.    More specifically, a specifier contains a set of "specifications",
  632. each of which associates a "locale" (a buffer object, a window object,
  633. a frame object, a device object, or the symbol `global') with an
  634. "inst-list", which is a list of one or more "inst-pairs". (For each
  635. possible locale, there can be at most one specification containing that
  636. locale.) Each inst-pair is a cons of a "tag set" (an unordered list of
  637. zero or more symbols, or "tags") and an "instantiator" (the allowed
  638. form of this varies depending on the type of specifier).  In a given
  639. specification, there may be more than one inst-pair with the same tag
  640. set; this is unlike for locales.
  641.  
  642.    The tag set is used to restrict the sorts of devices over which the
  643. instantiator is valid and to uniquely identify instantiators added by a
  644. particular application, so that different applications can work on the
  645. same specifier and not interfere with each other.  Each tag can have a
  646. "predicate" associated with it, which is a function of one argument (a
  647. device) that specifies whether the tag matches that particular device.
  648. (If a tag does not have a predicate, it matches all devices.) All tags
  649. in a tag set must match a device for the associated inst-pair to be
  650. instantiable over that device.  (A null tag set is perfectly valid.)
  651.  
  652.    The valid device types (normally `x', `tty', and `stream') and
  653. device classes (normally `color', `grayscale', and `mono') can always
  654. be used as tags, and match devices of the associated type or class
  655. (*note Devices::.).  User-defined tags may be defined, with an optional
  656. predicate specified.  An application can create its own tag, use it to
  657. mark all its instantiators, and be fairly confident that it will not
  658. interfere with other applications that modify the same specifier -
  659. Functions that add a specification to a specifier usually only
  660. overwrite existing inst-pairs with the same tag set as was given, and a
  661. particular tag or tag set can be specified when removing instantiators.
  662.  
  663.    When a specifier is instanced in a domain, both the locale and the
  664. tag set can be viewed as specifying necessary conditions that must
  665. apply in that domain for an instantiator to be considered as a possible
  666. result of the instancing.  More specific locales always override more
  667. general locales (thus, there is no particular ordering of the
  668. specifications in a specifier); however, the tag sets are simply
  669. considered in the order that the inst-pairs occur in the
  670. specification's inst-list.
  671.  
  672.    Note also that the actual object that results from the instancing
  673. (called an "instance object") may not be the same as the instantiator
  674. from which it was derived.  For some specifier types (such as integer
  675. specifiers and boolean specifiers), the instantiator will be returned
  676. directly as the instance object.  For other types, however, this is not
  677. the case.  For example, for font specifiers, the instantiator is a
  678. font-description string and the instance object is a font-instance
  679. object, which describes how the font is displayed on a particular
  680. device.  A font-instance object encapsulates such things as the actual
  681. font name used to display the font on that device (a font-description
  682. string under X is usually a wildcard specification that may resolve to
  683. different font names, with possibly different foundries, widths, etc.,
  684. on different devices), the extra properties of that font on that
  685. device, etc.  Furthermore, this conversion (called "instantiation")
  686. might fail - a font or color might not exist on a particular device,
  687. for example.
  688.  
  689. 
  690. File: lispref.info,  Node: Specifier Instancing,  Next: Specifier Types,  Prev: Specifiers In-Depth,  Up: Specifiers
  691.  
  692. How a Specifier Is Instanced
  693. ============================
  694.  
  695.    Instancing of a specifier in a particular window domain proceeds as
  696. follows:
  697.  
  698.    * First, XEmacs searches for a specification whose locale is the
  699.      same as the window's buffer.  If that fails, the search is
  700.      repeated, looking for a locale that is the same as the window
  701.      itself.  If that fails, the search is repeated using the window's
  702.      frame, then using the device that frame is on.  Finally, the
  703.      specification whose locale is the symbol `global' (if there is
  704.      such a specification) is considered.
  705.  
  706.    * The inst-pairs contained in the specification that was found are
  707.      considered in their order in the inst-list, looking for one whose
  708.      tag set matches the device that is derived from the window domain.
  709.      (The tag set is an unordered list of zero or more tag symbols.
  710.      For all tags that have predicates associated with them, the
  711.      predicate must match the device.)
  712.  
  713.    * If a matching tag set is found, the corresponding instantiator is
  714.      passed to the specifier's instantiation method, which is specific
  715.      to the type of the specifier.  If it succeeds, the resulting
  716.      instance object is returned as the result of the instancing and
  717.      the instancing is done.  Otherwise, the operation continues,
  718.      looking for another matching inst-pair in the current
  719.      specification.
  720.  
  721.    * When there are no more inst-pairs to be considered in the current
  722.      specification, the search starts over, looking for another
  723.      specification as in the first step above.
  724.  
  725.    * If all specifications are exhausted and no instance object can be
  726.      derived, the instancing fails. (Actually, this is not completely
  727.      true.  Some specifier objects for built-in properties have a
  728.      "fallback" value, which is either an inst-list or another
  729.      specifier object, that is consulted if the instancing is about to
  730.      fail.  If it is an inst-list, the searching proceeds using the
  731.      inst-pairs in that list.  If it is a specifier, the entire
  732.      instancing starts over using that specifier instead of the given
  733.      one.  Fallback values are set by the C code and cannot be
  734.      modified, except perhaps indirectly, using any Lisp functions.
  735.      The purpose of them is to supply some values to make sure that
  736.      instancing of built-in properties can't fail and to implement some
  737.      basic specifier inheritance, such as the fact that faces inherit
  738.      their properties from the `default' face.)
  739.  
  740.    It is also possible to instance a specifier over a frame domain or
  741. device domain instead of over a window domain.  The C code, for example,
  742. instances the `top-toolbar-height' variable over a frame domain in
  743. order to determine the height of a frame's top toolbar.  Instancing over
  744. a frame or device is similar to instancing over a window except that
  745. specifications for locales that cannot be derived from the domain are
  746. ignored.  Specifically, instancing over a frame looks first for frame
  747. locales, then device locales, then the `global' locale.  Instancing
  748. over a device domain looks only for device locales and the `global'
  749. locale.
  750.  
  751. 
  752. File: lispref.info,  Node: Specifier Types,  Next: Adding Specifications,  Prev: Specifier Instancing,  Up: Specifiers
  753.  
  754. Specifier Types
  755. ===============
  756.  
  757.    There are various different types of specifiers.  The type of a
  758. specifier controls what sorts of instantiators are valid, how an
  759. instantiator is instantiated, etc.  Here is a list of built-in specifier
  760. types:
  761.  
  762. `boolean'
  763.      The valid instantiators are the symbols `t' and `nil'.  Instance
  764.      objects are the same as instantiators so no special instantiation
  765.      function is needed.
  766.  
  767. `integer'
  768.      The valid instantiators are integers.  Instance objects are the
  769.      same as instantiators so no special instantiation function is
  770.      needed.  `modeline-shadow-thickness' is an example of an integer
  771.      specifier (negative thicknesses indicate that the shadow is drawn
  772.      recessed instead of raised).
  773.  
  774. `natnum'
  775.      The valid instantiators are natnums (non-negative integers).
  776.      Instance objects are the same as instantiators so no special
  777.      instantiation function is needed.  Natnum specifiers are used for
  778.      dimension variables such as `top-toolbar-height'.
  779.  
  780. `generic'
  781.      All Lisp objects are valid instantiators.  Instance objects are
  782.      the same as instantiators so no special instantiation function is
  783.      needed.
  784.  
  785. `font'
  786.      The valid instantiators are strings describing fonts or vectors
  787.      indicating inheritance from the font of some face.  Instance
  788.      objects are font-instance objects, which are specific to a
  789.      particular device.  The instantiation method in this specifier can
  790.      fail, unlike for integer, natnum, boolean, and generic specifiers.
  791.  
  792. `color'
  793.      The valid instantiators are strings describing colors or vectors
  794.      indicating inheritance from the foreground or background of some
  795.      face.  Instance objects are color-instance objects, which are
  796.      specific to a particular device.  The instantiation method in this
  797.      specifier can fail, as for font specifiers.
  798.  
  799. `image'
  800.      Images are perhaps the most complicated type of built-in
  801.      specifier.  The valid instantiators are strings (a filename,
  802.      inline data for a pixmap, or text to be displayed in a text glyph)
  803.      or vectors describing inline data of various sorts or indicating
  804.      inheritance from the background-pixmap property of some face.
  805.      Instance objects are either strings (for text images),
  806.      image-instance objects (for pixmap images), or subwindow objects
  807.      (for subwindow images).  The instantiation method in this
  808.      specifier can fail, as for font and color specifiers.
  809.  
  810. `face-boolean'
  811.      The valid instantiators are the symbols `t' and `nil' and vectors
  812.      indicating inheritance from a boolean property of some face.
  813.      Specifiers of this sort are used for all of the built-in boolean
  814.      properties of faces.  Instance objects are either the symbol `t'
  815.      or the symbol `nil'.
  816.  
  817. `toolbar'
  818.      The valid instantiators are toolbar descriptors, which are lists
  819.      of toolbar-button descriptors (each of which is a vector of two or
  820.      four elements).  *Note Toolbar:: for more information.
  821.  
  822.    *Note Faces and Window-System Objects:: for more information on
  823. fonts, colors, and face-boolean specifiers.  *Note Glyphs:: for more
  824. information about image specifiers.  *Note Toolbar:: for more
  825. information on toolbar specifiers.
  826.  
  827.  - Function: specifier-type SPECIFIER
  828.      This function returns the type of SPECIFIER.  The returned value
  829.      will be a symbol: one of `integer', `boolean', etc., as listed in
  830.      the above table.
  831.  
  832.    Functions are also provided to query whether an object is a
  833. particular kind of specifier:
  834.  
  835.  - Function: boolean-specifier-p OBJECT
  836.      This function returns non-`nil' if OBJECT is a boolean specifier.
  837.  
  838.  - Function: integer-specifier-p OBJECT
  839.      This function returns non-`nil' if OBJECT is an integer specifier.
  840.  
  841.  - Function: natnum-specifier-p OBJECT
  842.      This function returns non-`nil' if OBJECT is a natnum specifier.
  843.  
  844.  - Function: generic-specifier-p OBJECT
  845.      This function returns non-`nil' if OBJECT is a generic specifier.
  846.  
  847.  - Function: face-boolean-specifier-p OBJECT
  848.      This function returns non-`nil' if OBJECT is a face-boolean
  849.      specifier.
  850.  
  851.  - Function: toolbar-specifier-p OBJECT
  852.      This function returns non-`nil' if OBJECT is a toolbar specifier.
  853.  
  854.  - Function: font-specifier-p OBJECT
  855.      This function returns non-`nil' if OBJECT is a font specifier.
  856.  
  857.  - Function: color-specifier-p OBJECT
  858.      This function returns non-`nil' if OBJECT is a color specifier.
  859.  
  860.  - Function: image-specifier-p OBJECT
  861.      This function returns non-`nil' if OBJECT is an image specifier.
  862.  
  863. 
  864. File: lispref.info,  Node: Adding Specifications,  Next: Retrieving Specifications,  Prev: Specifier Types,  Up: Specifiers
  865.  
  866. Adding specifications to a Specifier
  867. ====================================
  868.  
  869.  - Function: add-spec-to-specifier SPECIFIER INSTANTIATOR &optional
  870.           LOCALE TAG-SET HOW-TO-ADD
  871.      This function adds a specification to SPECIFIER.  The
  872.      specification maps from LOCALE (which should be a buffer, window,
  873.      frame, device, or the symbol `global', and defaults to `global')
  874.      to INSTANTIATOR, whose allowed values depend on the type of the
  875.      specifier.  Optional argument TAG-SET limits the instantiator to
  876.      apply only to the specified tag set, which should be a list of
  877.      tags all of which must match the device being instantiated over
  878.      (tags are a device type, a device class, or tags defined with
  879.      `define-specifier-tag').  Specifying a single symbol for TAG-SET
  880.      is equivalent to specifying a one-element list containing that
  881.      symbol.  Optional argument HOW-TO-ADD specifies what to do if
  882.      there are already specifications in the specifier.  It should be
  883.      one of
  884.  
  885.     `prepend'
  886.           Put at the beginning of the current list of instantiators for
  887.           LOCALE.
  888.  
  889.     `append'
  890.           Add to the end of the current list of instantiators for
  891.           LOCALE.
  892.  
  893.     `remove-tag-set-prepend'
  894.           This is the default.  Remove any existing instantiators whose
  895.           tag set is the same as TAG-SET; then put the new instantiator
  896.           at the beginning of the current list.
  897.  
  898.     `remove-tag-set-append'
  899.           Remove any existing instantiators whose tag set is the same as
  900.           TAG-SET; then put the new instantiator at the end of the
  901.           current list.
  902.  
  903.     `remove-locale'
  904.           Remove all previous instantiators for this locale before
  905.           adding the new spec.
  906.  
  907.     `remove-locale-type'
  908.           Remove all specifications for all locales of the same type as
  909.           LOCALE (this includes LOCALE itself) before adding the new
  910.           spec.
  911.  
  912.     `remove-all'
  913.           Remove all specifications from the specifier before adding
  914.           the new spec.
  915.  
  916.      `remove-tag-set-prepend' is the default.
  917.  
  918.      You can retrieve the specifications for a particular locale or
  919.      locale type with the function `specifier-spec-list' or
  920.      `specifier-specs'.
  921.  
  922.  - Function: add-spec-list-to-specifier SPECIFIER SPEC-LIST &optional
  923.           HOW-TO-ADD
  924.      This function adds a "spec-list" (a list of specifications) to
  925.      SPECIFIER.  The format of a spec-list is
  926.  
  927.             `((LOCALE (TAG-SET . INSTANTIATOR) ...) ...)'
  928.  
  929.      where
  930.  
  931.         * LOCALE := a buffer, a window, a frame, a device, or `global'
  932.  
  933.         * TAG-SET := an unordered list of zero or more TAGS, each of
  934.           which is a symbol TAG := a device class (*note Devices::.), a
  935.           device type, or a tag defined with `define-specifier-tag'
  936.  
  937.         * INSTANTIATOR := format determined by the type of specifier
  938.  
  939.      The pair `(TAG-SET . INSTANTIATOR)' is called an "inst-pair".  A
  940.      list of inst-pairs is called an "inst-list".  The pair `(LOCALE .
  941.      INST-LIST)' is called a "specification".  A spec-list, then, can
  942.      be viewed as a list of specifications.
  943.  
  944.      HOW-TO-ADD specifies how to combine the new specifications with
  945.      the existing ones, and has the same semantics as for
  946.      `add-spec-to-specifier'.
  947.  
  948.      In many circumstances, the higher-level function `set-specifier' is
  949.      more convenient and should be used instead.
  950.  
  951.  - Function: set-specifier SPECIFIER VALUE &optional HOW-TO-ADD
  952.      This function adds some specifications to SPECIFIER.  VALUE can be
  953.      a single instantiator or tagged instantiator (added as a global
  954.      specification), a list of tagged and/or untagged instantiators
  955.      (added as a global specification), a cons of a locale and
  956.      instantiator or locale and instantiator list, a list of such
  957.      conses, or nearly any other reasonable form.  More specifically,
  958.      VALUE can be anything accepted by `canonicalize-spec-list'.
  959.  
  960.      HOW-TO-ADD is the same as in `add-spec-to-specifier'.
  961.  
  962.      Note that `set-specifier' is exactly complementary to
  963.      `specifier-specs' except in the case where SPECIFIER has no specs
  964.      at all in it but `nil' is a valid instantiator (in that case,
  965.      `specifier-specs' will return `nil' (meaning no specs) and
  966.      `set-specifier' will interpret the `nil' as meaning "I'm adding a
  967.      global instantiator and its value is `nil'"), or in strange cases
  968.      where there is an ambiguity between a spec-list and an inst-list,
  969.      etc. (The built-in specifier types are designed in such a way as
  970.      to avoid any such ambiguities.)
  971.  
  972.      If you want to work with spec-lists, you should probably not use
  973.      these functions, but should use the lower-level functions
  974.      `specifier-spec-list' and `add-spec-list-to-specifier'.  These
  975.      functions always work with fully-qualified spec-lists; thus, there
  976.      is no ambiguity.
  977.  
  978.  - Function: canonicalize-inst-pair INST-PAIR SPECIFIER-TYPE &optional
  979.           NOERROR
  980.      This function canonicalizes the given INST-PAIR.
  981.  
  982.      SPECIFIER-TYPE specifies the type of specifier that this SPEC-LIST
  983.      will be used for.
  984.  
  985.      Canonicalizing means converting to the full form for an inst-pair,
  986.      i.e.  `(TAG-SET . INSTANTIATOR)'.  A single, untagged instantiator
  987.      is given a tag set of `nil' (the empty set), and a single tag is
  988.      converted into a tag set consisting only of that tag.
  989.  
  990.      If NOERROR is non-`nil', signal an error if the inst-pair is
  991.      invalid; otherwise return `t'.
  992.  
  993.  - Function: canonicalize-inst-list INST-LIST SPECIFIER-TYPE &optional
  994.           NOERROR
  995.      This function canonicalizes the given INST-LIST (a list of
  996.      inst-pairs).
  997.  
  998.      SPECIFIER-TYPE specifies the type of specifier that this INST-LIST
  999.      will be used for.
  1000.  
  1001.      Canonicalizing means converting to the full form for an inst-list,
  1002.      i.e.  `((TAG-SET . INSTANTIATOR) ...)'.  This function accepts a
  1003.      single inst-pair or any abbrevation thereof or a list of (possibly
  1004.      abbreviated) inst-pairs. (See `canonicalize-inst-pair'.)
  1005.  
  1006.      If NOERROR is non-`nil', signal an error if the inst-list is
  1007.      invalid; otherwise return `t'.
  1008.  
  1009.  - Function: canonicalize-spec SPEC SPECIFIER-TYPE &optional NOERROR
  1010.      This function canonicalizes the given SPEC (a specification).
  1011.  
  1012.      SPECIFIER-TYPE specifies the type of specifier that this SPEC-LIST
  1013.      will be used for.
  1014.  
  1015.      Canonicalizing means converting to the full form for a spec, i.e.
  1016.      `(LOCALE (TAG-SET . INSTANTIATOR) ...)'.  This function accepts a
  1017.      possibly abbreviated inst-list or a cons of a locale and a
  1018.      possibly abbreviated inst-list. (See `canonicalize-inst-list'.)
  1019.  
  1020.      If NOERROR is `nil', signal an error if the specification is
  1021.      invalid; otherwise return `t'.
  1022.  
  1023.  - Function: canonicalize-spec-list SPEC-LIST SPECIFIER-TYPE &optional
  1024.           NOERROR
  1025.      This function canonicalizes the given SPEC-LIST (a list of
  1026.      specifications).
  1027.  
  1028.      SPECIFIER-TYPE specifies the type of specifier that this SPEC-LIST
  1029.      will be used for.
  1030.  
  1031.      Canonicalizing means converting to the full form for a spec-list,
  1032.      i.e.  `((LOCALE (TAG-SET . INSTANTIATOR) ...) ...)'.  This
  1033.      function accepts a possibly abbreviated specification or a list of
  1034.      such things. (See `canonicalize-spec'.) This is the function used
  1035.      to convert spec-lists accepted by `set-specifier' and such into a
  1036.      form suitable for `add-spec-list-to-specifier'.
  1037.  
  1038.      This function tries extremely hard to resolve any ambiguities, and
  1039.      the built-in specifier types (font, image, toolbar, etc.) are
  1040.      designed so that there won't be any ambiguities.
  1041.  
  1042.      If NOERROR is `nil', signal an error if the spec-list is invalid;
  1043.      otherwise return `t'.
  1044.  
  1045. 
  1046. File: lispref.info,  Node: Retrieving Specifications,  Next: Specifier Tag Functions,  Prev: Adding Specifications,  Up: Specifiers
  1047.  
  1048. Retrieving the Specifications from a Specifier
  1049. ==============================================
  1050.  
  1051.  - Function: specifier-spec-list SPECIFIER &optional LOCALE TAG-SET
  1052.           EXACT-P
  1053.      This function returns the spec-list of specifications for
  1054.      SPECIFIER in LOCALE.
  1055.  
  1056.      If LOCALE is a particular locale (a buffer, window, frame, device,
  1057.      or the symbol `global'), a spec-list consisting of the
  1058.      specification for that locale will be returned.
  1059.  
  1060.      If LOCALE is a locale type (i.e. a symbol `buffer', `window',
  1061.      `frame', or `device'), a spec-list of the specifications for all
  1062.      locales of that type will be returned.
  1063.  
  1064.      If LOCALE is `nil' or the symbol `all', a spec-list of all
  1065.      specifications in SPECIFIER will be returned.
  1066.  
  1067.      LOCALE can also be a list of locales, locale types, and/or `all';
  1068.      the result is as if `specifier-spec-list' were called on each
  1069.      element of the list and the results concatenated together.
  1070.  
  1071.      Only instantiators where TAG-SET (a list of zero or more tags) is
  1072.      a subset of (or possibly equal to) the instantiator's tag set are
  1073.      returned.  (The default value of` nil' is a subset of all tag sets,
  1074.      so in this case no instantiators will be screened out.) If EXACT-P
  1075.      is non-`nil', however, TAG-SET must be equal to an instantiator's
  1076.      tag set for the instantiator to be returned.
  1077.  
  1078.  - Function: specifier-specs SPECIFIER &optional LOCALE TAG-SET EXACT-P
  1079.      This function returns the specification(s) for SPECIFIER in LOCALE.
  1080.  
  1081.      If LOCALE is a single locale or is a list of one element
  1082.      containing a single locale, then a "short form" of the
  1083.      instantiators for that locale will be returned.  Otherwise, this
  1084.      function is identical to `specifier-spec-list'.
  1085.  
  1086.      The "short form" is designed for readability and not for ease of
  1087.      use in Lisp programs, and is as follows:
  1088.  
  1089.        1. If there is only one instantiator, then an inst-pair (i.e.
  1090.           cons of tag and instantiator) will be returned; otherwise a
  1091.           list of inst-pairs will be returned.
  1092.  
  1093.        2. For each inst-pair returned, if the instantiator's tag is
  1094.           `any', the tag will be removed and the instantiator itself
  1095.           will be returned instead of the inst-pair.
  1096.  
  1097.        3. If there is only one instantiator, its value is `nil', and
  1098.           its tag is `any', a one-element list containing `nil' will be
  1099.           returned rather than just `nil', to distinguish this case
  1100.           from there being no instantiators at all.
  1101.  
  1102.  
  1103.  - Function: specifier-fallback SPECIFIER
  1104.      This function returns the fallback value for SPECIFIER.  Fallback
  1105.      values are provided by the C code for certain built-in specifiers
  1106.      to make sure that instancing won't fail even if all specs are
  1107.      removed from the specifier, or to implement simple inheritance
  1108.      behavior (e.g. this method is used to ensure that faces other than
  1109.      `default' inherit their attributes from `default').  By design,
  1110.      you cannot change the fallback value, and specifiers created with
  1111.      `make-specifier' will never have a fallback (although a similar,
  1112.      Lisp-accessible capability may be provided in the future to allow
  1113.      for inheritance).
  1114.  
  1115.      The fallback value will be an inst-list that is instanced like any
  1116.      other inst-list, a specifier of the same type as SPECIFIER
  1117.      (results in inheritance), or `nil' for no fallback.
  1118.  
  1119.      When you instance a specifier, you can explicitly request that the
  1120.      fallback not be consulted. (The C code does this, for example, when
  1121.      merging faces.) See `specifier-instance'.
  1122.  
  1123.